package cn.minhx.domain.activity.service.trial.task;

import cn.minhx.domain.activity.adapter.IActivityRepository;
import cn.minhx.domain.activity.model.valobj.SkuVO;
import java.util.concurrent.Callable;

/**
 * 查询商品信息任务
 *
 * @author minhx
 */
public class QuerySkuVOTask implements Callable<SkuVO> {

	private final String goodsId;

	private final IActivityRepository activityRepository;

	public QuerySkuVOTask(String goodsId, IActivityRepository activityRepository) {
		this.goodsId = goodsId;
		this.activityRepository = activityRepository;
	}

	@Override
	public SkuVO call() throws Exception {
		return activityRepository.querySkuByGoodsId(goodsId);
	}
}
